﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package Display.DialogUI {
    import flash.utils.*;
    import org.aswing.*;
    import Classes.*;
    import flash.text.*;
    import org.aswing.border.*;
    import Display.aswingui.*;

    public class CharacterResponseDialogView extends GenericDialogView {

        public function CharacterResponseDialogView(_arg1:Dictionary, _arg2:String="", _arg3:String="", _arg4:int=0, _arg5:Function=null, _arg6:String="", _arg7:int=0, _arg8:String="", _arg9:Function=null, _arg10:String="", _arg11:Boolean=true){
            super(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10, _arg11);
        }
        override protected function createTextArea():JPanel{
            var _local2:Number;
            var _local8:JPanel;
            var _local1:JPanel = ASwingHelper.makeSoftBoxJPanel(SoftBoxLayout.CENTER, 0);
            m_messagePaddingLeft = 8;
            m_messagePaddingRight = 20;
            if (((!((m_icon == null))) && (!((m_icon == ""))))){
                _local2 = setMessageTextWidth((((m_iconPos == ICON_POS_LEFT)) || ((m_iconPos == ICON_POS_RIGHT))));
                _local8 = createIconPane();
            };
            var _local3:Component = this.createTextComponent(_local2);
            var _local4:JPanel = createTextAreaInnerPane(_local3);
            var _local5:JPanel = _local8;
            var _local6:JPanel = _local4;
            _local1.append(ASwingHelper.horizontalStrut(m_messagePaddingLeft));
            if ((((m_iconPos == ICON_POS_LEFT)) || ((m_iconPos == ICON_POS_RIGHT)))){
                if (_local5){
                    _local1.append(_local5);
                };
                _local1.append(ASwingHelper.horizontalStrut(m_messagePaddingRight));
                if (_local6){
                    _local1.append(_local6);
                };
            };
            _local1.append(ASwingHelper.horizontalStrut(m_messagePaddingRight));
            var _local7:int = _local3.getHeight();
            return (_local1);
        }
        override protected function createInteriorHolder():JPanel{
            var _local1:JPanel;
            var _local2:JPanel;
            var _local3:JPanel;
            _local1 = new JPanel(new SoftBoxLayout(SoftBoxLayout.Y_AXIS, -10, AsWingConstants.CENTER));
            _local2 = createHeaderPanel();
            ASwingHelper.prepare(_local2);
            textArea = this.createTextArea();
            ASwingHelper.prepare(textArea);
            _local1.setBorder(new EmptyBorder(null, new Insets(0, 0, 0, 0)));
            if (m_type != TYPE_NOBUTTONS){
                _local1.append(_local2);
            };
            _local1.append(ASwingHelper.verticalStrut(20));
            _local1.append(textArea);
            _local1.append(ASwingHelper.verticalStrut(3));
            if (((!((m_type == TYPE_MODAL))) && (!((m_type == TYPE_NOBUTTONS))))){
                _local3 = createButtonPanel();
                _local1.append(_local3);
            };
            ASwingHelper.prepare(_local1);
            return (_local1);
        }
        override protected function createTextComponent(_arg1:Number):Component{
            var _local2:Component;
            var _local5:Number;
            var _local6:Container;
            m_align = TextFormatAlign.LEFT;
            var _local3:Component = ASwingHelper.makeMultilineText(m_message, _arg1, EmbeddedArt.DEFAULT_FONT_NAME_BOLD, m_align, 18, EmbeddedArt.blueTextColor);
            var _local4:Number = 75;
            if (_local3.getHeight() < _local4){
                _local5 = ((_local4 - _local3.getHeight()) / 2);
                _local6 = ASwingHelper.makeSoftBoxJPanelVertical();
                _local6.append(ASwingHelper.verticalStrut(_local5));
                _local6.append(_local3);
                _local6.append(ASwingHelper.verticalStrut(_local5));
                _local2 = _local6;
            } else {
                _local2 = _local3;
            };
            return (_local2);
        }

    }
}//package Display.DialogUI 
